Benjamin Otte [Mon, 16 Nov 2020 19:16:53 +0000 (20:16 +0100)]
build: Include GSK types in gtk_test_register_all_type()
Matthias Clasen [Fri, 6 Nov 2020 01:23:16 +0000 (01:23 +0000)]
Merge branch 'wip/carlosg/for-master' into 'master'
Text handle fixes
Closes #3176
See merge request GNOME/gtk!2785
Matthias Clasen [Fri, 6 Nov 2020 01:20:23 +0000 (01:20 +0000)]
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
macos: tweak opacity, color/alpha size requests
See merge request GNOME/gtk!2786
Christian Hergert [Thu, 5 Nov 2020 21:57:41 +0000 (13:57 -0800)]
macos: use NSOpenGLContext directly for current tracking
We don't need to interact with GdkGLContext here to keep the
current context active.
Christian Hergert [Thu, 5 Nov 2020 21:37:25 +0000 (13:37 -0800)]
macos: explicitly request color and alpha sizes
Christian Hergert [Thu, 5 Nov 2020 21:34:29 +0000 (13:34 -0800)]
macos: use opaque GL context when possible
This is better for situations where the window is decorated and therefore we can
rely on window system clipping of rounded corners.
Carlos Garnacho [Thu, 5 Nov 2020 20:15:47 +0000 (21:15 +0100)]
gtk/textview: Do not forcibly show text handles
The gtk_text_view_set_handle_position() function called some lines above
takes care of handle visibility already, also accounting for other
conditions (e.g. whether the handle points to contents onscreen).
Forcibly showing handles here misbehaves if the handle should stay hidden,
and somewhat expensively as it involves creating and throwing a native
surface every time.
Carlos Garnacho [Thu, 5 Nov 2020 20:07:54 +0000 (21:07 +0100)]
gtk/textview: Defer touchscreen focus placing to drag end
With the scrolledwindow drag gesture not claiming the sequence immediately,
we end up placing the cursor (and undoing the previous selection) each time
we scroll.
There is already handling too short drags in ::drag-end, so let this code
handle touchscreens as well.
Carlos Garnacho [Thu, 5 Nov 2020 20:05:18 +0000 (21:05 +0100)]
gtk/textview: Clean up further if the drag gesture is taken over
If the gesture becomes captured (e.g. from a parent scrolledwindow), we
leave some things in the air. Clean these up properly. This is recurrent
with touch scroll.
Carlos Garnacho [Thu, 5 Nov 2020 15:00:29 +0000 (16:00 +0100)]
gtk/imcontextwayland: Unset focus when unsetting widget
In destruction paths of a focused entry, the IM context might first
end up detached from its widget, then destroyed. This currently prevents
the IM context from detaching itself from the GtkIMContextWaylandGlobal.
Make it do so when unsetting the client widget, so the IM context gets
properly unfocused before destruction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3176
Carlos Garnacho [Thu, 5 Nov 2020 14:11:09 +0000 (15:11 +0100)]
gtk/texthandle: Handle events on parent surface's native
In wayland, popup positioning and event handling are doubly async.
This makes it unreliable to figure out parent surface coordinates
out of the popup position and the events received. This results in
jumpy text handles there.
The best way to deal with parent surface coordinates is to handle
the events there. Make the handles transparent to input, and make
the drag gesture be set up on the parent widget's native.
The gesture is set up in the capture phase, setting it on the native
(as opposed to the parent widget) achieves a feeling similar to it
being a distinct surface, as it should take precedence over other
gestures in the emission chain (e.g. scrolledwindows).
As everything is in parent widget's native's coordinates, the drag
handles become smooth again.
Carlos Garnacho [Thu, 5 Nov 2020 14:09:35 +0000 (15:09 +0100)]
gdk/wayland: Ensure to update input area on map
If a surface is hidden, then shown again, it should preserve the
input area specified. Make sure that happens.
Matthias Clasen [Thu, 5 Nov 2020 16:43:08 +0000 (16:43 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3325
See merge request GNOME/gtk!2784
Emmanuele Bassi [Thu, 5 Nov 2020 15:37:38 +0000 (15:37 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!2783
Emmanuele Bassi [Thu, 5 Nov 2020 14:50:40 +0000 (14:50 +0000)]
docs: Add a note on the "presentation" role
Emmanuele Bassi [Thu, 5 Nov 2020 13:57:50 +0000 (13:57 +0000)]
docs: Add a section on accessible buttons
Anything that behaves like a button should do so at the accessibility
level as well.
Emmanuele Bassi [Thu, 5 Nov 2020 13:46:43 +0000 (13:46 +0000)]
a11y: Use proper role and state for tree expander image
The "expander" image is a button, and it controls the expansion of the
row, so it has a state associated to it that we must update.
Emmanuele Bassi [Thu, 5 Nov 2020 13:19:26 +0000 (13:19 +0000)]
a11y: Use "presentation" role instead of "hidden" state
The intended use case of the "presentation" role is
| […] when an element is used to change the look of the page but does not
| have all the functional, interactive, or structural relevance implied
| by the element type, or may be used to provide for an accessible
| fallback in older browsers that do not support WAI-ARIA.
One of the examples is, literally:
| An element whose content is completely presentational (like a spacer
| image, decorative graphic, or clearing element);
Which fits perfectly for the GtkTreeExpander's "indent" builtin icon
widget.
Emmanuele Bassi [Thu, 5 Nov 2020 13:14:08 +0000 (13:14 +0000)]
a11y: ARIA's "presentation" role maps to ATSPI_ROLE_SECTION
See the mapping role table in the Core-AAM normative document:
https://w3c.github.io/core-aam/#mapping_role_table
Matthias Clasen [Thu, 5 Nov 2020 12:23:38 +0000 (07:23 -0500)]
dragicon: Make a function propertly exported
Mark gtk_drag_icon_create_widget_for_value with
GDK_AVAILABLE_IN_ALL, since it is meant to be public.
Also, clarify the documentation a bit.
Fixes: #3325
Matthias Clasen [Thu, 5 Nov 2020 04:35:01 +0000 (23:35 -0500)]
Cosmetics
Fix argument ordering of gdk_cursor_new_from_name.
Matthias Clasen [Thu, 5 Nov 2020 04:34:36 +0000 (23:34 -0500)]
testsuite: Improve GdkCursor coverage
Matthias Clasen [Thu, 5 Nov 2020 02:46:10 +0000 (21:46 -0500)]
3.99.4
Matthias Clasen [Thu, 5 Nov 2020 02:21:02 +0000 (02:21 +0000)]
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
macos: gl context improvements and event cleanup
See merge request GNOME/gtk!2780
Matthias Clasen [Thu, 5 Nov 2020 02:19:18 +0000 (02:19 +0000)]
Merge branch 'wip/chergert/fix-macos-pointer-position-over-surface' into 'master'
macos: fix calculation of mouse position
See merge request GNOME/gtk!2781
Christian Hergert [Thu, 5 Nov 2020 02:02:04 +0000 (18:02 -0800)]
macos: fix calculation of mouse position
This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
Matthias Clasen [Thu, 5 Nov 2020 01:53:34 +0000 (01:53 +0000)]
Merge branch 'patch-5' into 'master'
Update comment annotations of gtk_tree_model_iter_previous and...
See merge request GNOME/gtk!2775
Matthias Clasen [Thu, 5 Nov 2020 01:53:02 +0000 (01:53 +0000)]
Merge branch 'fix-issue-2019-for-master' into 'master'
[master] GdkW32: remove klassTEMPSHADOW
Closes #2019
See merge request GNOME/gtk!2750
Matthias Clasen [Thu, 5 Nov 2020 01:48:37 +0000 (01:48 +0000)]
Merge branch 'mr1063-for-master' into 'master'
Forward port MR !1063 (Win32 IME fixes) to GTK master
See merge request GNOME/gtk!2777
Christian Hergert [Thu, 5 Nov 2020 01:09:48 +0000 (17:09 -0800)]
macos: resize extra GL window/view when surface changes
Once we figure out what is going on with textures, changes are we'll be
able to let this stay a zero rect. But that is still a bit up in the air right now.
Christian Hergert [Thu, 5 Nov 2020 01:08:43 +0000 (17:08 -0800)]
macos: clip damage when swapping buffers
This ensures that we only copy the changed area.
Christian Hergert [Thu, 5 Nov 2020 00:58:50 +0000 (16:58 -0800)]
macos: remove synthesize_motion helper
We can use gdk_surface_request_motion() now instead of our extra
helper to do essentially the same thing.
Christian Hergert [Wed, 4 Nov 2020 22:40:11 +0000 (14:40 -0800)]
macos: always create dummy window/view for GL context
This simplifies the creation by always creating the dummy views, and then
removes it if necessary by detecting the begin_frame/end_frame pair.
Christian Hergert [Thu, 5 Nov 2020 00:28:13 +0000 (16:28 -0800)]
Revert "Simplify gdk_surface_queue_render"
This reverts commit
2120e9df880cabfe21d5a4e8c2d0e6804a4e09d8.
Matthias Clasen [Wed, 4 Nov 2020 20:41:09 +0000 (20:41 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2779
Matthias Clasen [Wed, 4 Nov 2020 20:37:39 +0000 (20:37 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!2778
Matthias Clasen [Wed, 4 Nov 2020 19:56:52 +0000 (14:56 -0500)]
popovermenu: Fail gracefully if no model
If we don't have a model yet, return FALSE from
gtk_popover_menu_add_custom().
Matthias Clasen [Tue, 3 Nov 2020 20:47:03 +0000 (15:47 -0500)]
Cosmetics
Extraneous pair of parens snuck in with
2120e9df88.
Matthias Clasen [Tue, 3 Nov 2020 20:28:40 +0000 (15:28 -0500)]
surface: Be smarter about autohide
When we close grabbing popups due to an outside
click, check at each level if the click is still
outside. This makes closing the nested popover
menu in the popover on page 3 of widget-factory
work as expected, when you click the menubutton
again.
Matthias Clasen [Tue, 3 Nov 2020 20:26:47 +0000 (15:26 -0500)]
surface: Be more lenient for autohide
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
Emmanuele Bassi [Wed, 4 Nov 2020 19:39:08 +0000 (19:39 +0000)]
a11y: Remove stray g_printerr()
Emmanuele Bassi [Wed, 4 Nov 2020 19:38:14 +0000 (19:38 +0000)]
a11y: Hide the "indent" in GtkTreeExpander
It's just padding.
Emmanuele Bassi [Wed, 4 Nov 2020 18:59:11 +0000 (18:59 +0000)]
a11y: Describe window controls
The window controls for client side decorations have only icons, which
means they are not accessible.
Matthias Clasen [Wed, 4 Nov 2020 18:10:55 +0000 (18:10 +0000)]
Merge branch 'a11y/atcontext-realize' into 'master'
A11y/atcontext realize
See merge request GNOME/gtk!2772
Matthias Clasen [Wed, 4 Nov 2020 17:54:48 +0000 (12:54 -0500)]
gtk-demo: Simplify the run button
Don't create the label manually. It is not necessary,
and letting the button do it also improves the
accessibility setup.
Matthias Clasen [Wed, 4 Nov 2020 17:53:23 +0000 (12:53 -0500)]
gtk-demo: Set some accessible properties
Set labels in the builder demo. The ARIA authoring practices
say that both menubars and toolbars *must* have an accessible
label.
Emmanuele Bassi [Wed, 4 Nov 2020 16:59:19 +0000 (16:59 +0000)]
a11y: Move parent context ref getter to its own function
Keeps the body of handle_accessible_get_property() readable.
Emmanuele Bassi [Wed, 4 Nov 2020 16:43:59 +0000 (16:43 +0000)]
a11y: Make the Button labelled by its child label
Establish the relation whenever we set the label widget.
Emmanuele Bassi [Wed, 4 Nov 2020 16:42:16 +0000 (16:42 +0000)]
a11y: Use the tooltip text as the accessible description
It's more common to have a tooltip as the accessible description than an
explicit description. This is also the behaviour of GTK3.
Emmanuele Bassi [Wed, 4 Nov 2020 16:41:31 +0000 (16:41 +0000)]
Set accessible label on GTK Demo's primary menu
Otherwise its label is going to be "GtkMenuButton".
Emmanuele Bassi [Wed, 4 Nov 2020 16:40:59 +0000 (16:40 +0000)]
a11y: Unrealize ATContext on dispose
Matthias Clasen [Wed, 4 Nov 2020 16:53:07 +0000 (11:53 -0500)]
Propagate accessible-role to backend
We want to allow setting the accessible role as long
as the context is unrealized, so we need to propagate
the new role.
Matthias Clasen [Wed, 4 Nov 2020 16:36:52 +0000 (11:36 -0500)]
gtk-demo: Set an accessible role
Set an accessible role for the toolbar in the
builder demo. This tests accessibility support
in GtkBuilder.
Emmanuele Bassi [Wed, 4 Nov 2020 14:35:16 +0000 (14:35 +0000)]
a11y: Allow updating role on unrealized contexts
We can still change the accessible role if an ATContext instance is
unrealized.
Emmanuele Bassi [Mon, 19 Oct 2020 16:44:50 +0000 (17:44 +0100)]
a11y: Move ATContext to an explicit realization model
We are doing too much work during the construction phase of the
AT-SPI backend for GtkATContext. Instead of having the AtSpiContext
register itself at construction time, let's add explicit realize
and unrealize operations, and connect the ATContext realization to the
rooting operation of a GtkWidget.
Philip Zander [Mon, 7 Sep 2020 11:04:47 +0000 (19:04 +0800)]
Win32 IME fixes
See merge request !1063
kai-berlin [Sat, 31 Oct 2020 22:21:04 +0000 (22:21 +0000)]
broadway: Set modifier state of scroll events
Set modifier state of scroll events, so Ctrl-scroll
works.
Fixes: #2733
Matthias Clasen [Tue, 3 Nov 2020 20:15:08 +0000 (20:15 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3318, #3319, and #3320
See merge request GNOME/gtk!2776
Matthias Clasen [Tue, 3 Nov 2020 19:39:29 +0000 (14:39 -0500)]
texthandle: Queue a draw when role changes
This helps with role changes not taking immediate
effect.
Fixes: #3320
Matthias Clasen [Tue, 3 Nov 2020 19:37:27 +0000 (14:37 -0500)]
Simplify gdk_surface_queue_render
We can just call gdk_surface_invalidate_rect here
like we do elsewhere in gdk, and I'm a bit uncertain
about the current code that adds an empty update
region.
Matthias Clasen [Tue, 3 Nov 2020 17:37:07 +0000 (12:37 -0500)]
texthandle: Fix positioning
Use the same approach we use for popovers, using
gtk_widget_get_surface_allocation. It works.
Fixes: #3319
Matthias Clasen [Tue, 3 Nov 2020 17:09:43 +0000 (12:09 -0500)]
widget-factory: Make sure we close popover on page 3
We don't want the popover to stay open when we open
an about dialog or shortcuts window. Since cascade-popdown
would also affect e.g. the context menu of the text widgets,
do this explicitly.
Matthias Clasen [Tue, 3 Nov 2020 15:23:34 +0000 (10:23 -0500)]
popover: Change default for cascade-popdown
We've found a number of cases where this cascading
has unexpected side-effects. So, turn it off by
default, and only set it for menus.
Matthias Clasen [Tue, 3 Nov 2020 15:12:32 +0000 (10:12 -0500)]
Adwaita: Set a background for magnifiers
The magnifier in entries is magnifying the GtkText
widget, which does not draw any background itself.
Therefore, we give the magnifier a background, to
make things look as expected.
Fixes: #3318
Matthias Clasen [Tue, 3 Nov 2020 15:11:50 +0000 (10:11 -0500)]
magnifier: Set a css name
Predictably, we use the name "magnifier".
Matthias Clasen [Tue, 3 Nov 2020 14:41:33 +0000 (09:41 -0500)]
NEWS: Updates
Matthias Clasen [Tue, 3 Nov 2020 12:33:31 +0000 (07:33 -0500)]
docs: Mention g_file_get_basename
Mention g_file_get_basename in the migration guide section
about GtkFileChooser api changes.
Danny Milosavljevic [Tue, 3 Nov 2020 15:10:11 +0000 (15:10 +0000)]
Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified.
Matthias Clasen [Tue, 3 Nov 2020 12:14:21 +0000 (12:14 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2774
Matthias Clasen [Tue, 3 Nov 2020 03:50:03 +0000 (22:50 -0500)]
gtk-demo: Remove more gtk3-demo icon uses
Use our own logo everywhere.
Matthias Clasen [Tue, 3 Nov 2020 03:43:44 +0000 (22:43 -0500)]
gtk-demo: Tweak images demo
Use our own logo instead of the gtk3-demo one, and
tweak the headings to refledct what we show.
Matthias Clasen [Tue, 3 Nov 2020 01:58:28 +0000 (20:58 -0500)]
gtk-demo: Reanimate floppy buddy
Implement a GdkPaintable wrapper around GdkPixbufAnimation,
so floppy buddy can waive again.
Matthias Clasen [Tue, 3 Nov 2020 00:15:26 +0000 (19:15 -0500)]
widget-factory: Restore modality of the about dialog
Make the about dialog of widget-factory modal again.
This was lost in
87a8fda163d419ee3e.
Timm Bäder [Sun, 1 Nov 2020 11:27:59 +0000 (12:27 +0100)]
gl renderer: Make debugging code shorter
Timm Bäder [Sun, 1 Nov 2020 11:22:06 +0000 (12:22 +0100)]
gl renderer: Refactor vertex data loading code
Timm Bäder [Sun, 1 Nov 2020 11:16:44 +0000 (12:16 +0100)]
gl renderer: Use the load_vertex_data* functions more often
Timm Bäder [Sun, 1 Nov 2020 10:25:00 +0000 (11:25 +0100)]
gl renderer: More load_vertex_data* usage
Timm Bäder [Sat, 31 Oct 2020 16:15:24 +0000 (17:15 +0100)]
gl renderer: Reword a comment
Timm Bäder [Sat, 31 Oct 2020 16:13:31 +0000 (17:13 +0100)]
gl renderer: Remove an outdated comment
Timm Bäder [Sat, 31 Oct 2020 16:12:38 +0000 (17:12 +0100)]
gl renderer: Refactor rendering shadow nodes
Also use load_vertex_data_with_region here.
Timm Bäder [Sat, 31 Oct 2020 10:54:33 +0000 (11:54 +0100)]
gl renderer: Refactor blurred shadow drawing code
We already have various load_vertex_data* code, so try to reuse that
here.
Timm Bäder [Sat, 31 Oct 2020 07:54:27 +0000 (08:54 +0100)]
gl renderer: Nine-slice unblurred outset shadows
See #3284
Timm Bäder [Fri, 23 Oct 2020 09:01:34 +0000 (11:01 +0200)]
printoperation: Remove double assignment
Matthias Clasen [Mon, 2 Nov 2020 19:36:09 +0000 (19:36 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
gtk-demo polish
See merge request GNOME/gtk!2773
Matthias Clasen [Mon, 2 Nov 2020 18:56:19 +0000 (13:56 -0500)]
gtk-demo: Renovate the paned demo
Make this look less like testgtk from GTK 2.
Matthias Clasen [Mon, 2 Nov 2020 17:02:19 +0000 (12:02 -0500)]
fixup: window titles
Matthias Clasen [Mon, 2 Nov 2020 17:01:11 +0000 (12:01 -0500)]
gtk-demo: Polish all entry demos
Make the spacing a bit more consistent, and tweak
some strings here and there.
Matthias Clasen [Mon, 2 Nov 2020 17:00:24 +0000 (12:00 -0500)]
gtk-demo: Polish the search bar demo
Rename this, and make it look a bit less like a
debugging tool, and more like a demo.
Matthias Clasen [Mon, 2 Nov 2020 16:59:22 +0000 (11:59 -0500)]
gtk-demo: Tweak tagged entry styling
Move the tags closer together, and avoid resizing too much.
Matthias Clasen [Mon, 2 Nov 2020 16:05:57 +0000 (11:05 -0500)]
gtk-demo: Tweak window titles
This is an attempt to improve consistency in the sidebar
and the window titles.
Matthias Clasen [Mon, 2 Nov 2020 13:38:20 +0000 (08:38 -0500)]
gtk-demo: Use typographic style classes
We don't need to hardcode <u> in markup anymore.
Use the heading style class instead.
Matthias Clasen [Mon, 2 Nov 2020 11:52:13 +0000 (11:52 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
See merge request GNOME/gtk!2769
Matthias Clasen [Sun, 1 Nov 2020 19:47:02 +0000 (14:47 -0500)]
testsuite: Add tests for gtk4-builder-tool validate
Matthias Clasen [Mon, 2 Nov 2020 01:39:43 +0000 (20:39 -0500)]
builder-tool: Stop rewriting GtkPopoverMenu
We no longer allow manual creation of GtkPopoverMenu,
translating individual properties is not going to
change that.
Matthias Clasen [Sun, 1 Nov 2020 22:32:47 +0000 (17:32 -0500)]
testsuite: Test GtkFixed rewriting
Matthias Clasen [Sun, 1 Nov 2020 21:51:14 +0000 (16:51 -0500)]
builder-tool: Rewrite GtkFixed more
GtkFixedLayout does not have layout properties
for x and y, so turn those into a transform.
Matthias Clasen [Sun, 1 Nov 2020 19:47:42 +0000 (14:47 -0500)]
builder-tool: Avoid duplicate path prefixes
It is enough to print the file in which the error
occurred once; GtkBuilder already makes that part
of its error message.
Matthias Clasen [Sun, 1 Nov 2020 20:48:37 +0000 (15:48 -0500)]
builder-tool: Install a log writer
Install a log writer function that is a bit simpler than
the default GLib log writer, and does not put PIDs and
timestamps in the output, so we can compare easily in
our testsuite.
Matthias Clasen [Sun, 1 Nov 2020 20:47:44 +0000 (15:47 -0500)]
Set G_LOG_USE_STRUCTURED globally
It doesn't make much sense to set this in per-directory
meson files, since that makes use use different logging
facilities in different parts of the project. Set it
globally.
Matthias Clasen [Sun, 1 Nov 2020 15:37:58 +0000 (10:37 -0500)]
testsuite: Test GtkToolbar rewriting